﻿using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Text;

namespace Jack.SequentialGuid
{
	/// <summary>
	/// 
	/// </summary>
	public sealed class SequentialSqlGuidGenerator : SequentialGuidGeneratorBase<SequentialSqlGuidGenerator>
	{
		private SequentialSqlGuidGenerator() { }

		internal override Guid NewGuid(long timestamp) =>
		 base.NewGuid(timestamp).ToSqlGuid().Value;

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public SqlGuid NewSqlGuid() =>
			new SqlGuid(NewGuid());

		/// <summary>
		/// 
		/// </summary>
		/// <param name="timestamp"></param>
		/// <returns></returns>
		public SqlGuid NewSqlGuid(DateTime timestamp) =>
			new SqlGuid(NewGuid(timestamp));
	}
}
